home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 44 / PC Actual CD 44.iso / Linux / Cygwin / full.exe / Disk1 / data1.cab / Tools / H-i586-cygwin32 / i586-cygwin32 / include / sys / dirent.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-12-04  |  994 b   |  47 lines

  1. /* Posix dirent.h for WIN32.  */
  2.  
  3. /* Including this file should not require any Windows headers.  */
  4.    
  5. #ifndef _SYS_DIRENT_H
  6. #define _SYS_DIRENT_H
  7.  
  8. #include <sys/types.h>
  9.  
  10. struct dirent
  11. {
  12.   long __d_reserved[4];
  13.   ino_t d_ino; /* Just for compatibility, it's junk */
  14.   char d_name[256];        /* FIXME: use NAME_MAX? */
  15. };
  16.  
  17. #define __DIRENT_COOKIE 0xdede4242
  18.  
  19. typedef struct
  20. {
  21.   /* This is first to set alignment in non _COMPILING_NEWLIB case.  */
  22.   unsigned long __d_cookie;
  23.   struct dirent *__d_dirent;
  24.   char *__d_dirname;        /* directory name with trailing '*' */
  25.   int __d_find_first_called;    /* non-zero if FindFirstFile called */
  26.   unsigned long __d_dirhash;    /* hash of directory name for use by
  27.                    readdir */
  28.   union
  29.     {
  30. #ifdef _COMPILING_NEWLIB
  31.       struct
  32.     {
  33.       HANDLE __handle;
  34.       char __open_p;
  35.     } __d_data;
  36. #endif
  37.       char __d_filler[16];
  38.     } __d_u;
  39. } DIR;
  40.  
  41. DIR *opendir (const char *);
  42. struct dirent *readdir (DIR *);
  43. void rewinddir (DIR *);
  44. int closedir (DIR *);
  45.  
  46. #endif
  47.